for o in geometry do

(
if classof o.material == Shell_Material then
(

--reference original material
m = o.material

--create new material and set parameters
newMat = Multimaterial numsubs:(2) name: m.name

newMat.materialList[1] = 	m.originalMaterial
newMat.materialList[2] = 	m.bakedMaterial

--replace old material with new material / turn on viewport map
o.material = undefined
o.material = newMat
)
)